/**
 * 作者: wgx
 * 日期: 2024-12-20 09:52:30
 * 备注: 荣誉奖励(全服或是个人)奖励配置表
 */
package com.motu.monstercity.server.game.commondata.maintask;
import com.motu.monstercity.server.game.base.CommonUtils;
import io.vertx.core.json.JsonObject;

public class HonorReward extends HonorRewardModel {
    public HonorReward(JsonObject obj) {
        super(obj);
    }

    public boolean isServerHonor() {
        return getType() == MainTaskConstant.HONOR_TYPE_SERVER;
    }

    public boolean isUnionHonor() {
        return getType() == MainTaskConstant.HONOR_TYPE_UNION;
    }

    // honor_type和档位组成的唯一值 1aabbbbbbbb, aa honortype(2位),bb num(10位)
    public long takeHonorId() {
        int aa = 100 + getHonorType();
        String bb = CommonUtils.numberToString(getNum(), 10);
        String cc = aa + "" + bb;
        return Long.parseLong(cc);
    }
}
